<template>
  <div >
    <homeheader></homeheader>
    <homeloop></homeloop>
    <homeclass></homeclass>
    <homedetail :allclass="allclass"></homedetail>
    <homestart></homestart>
  </div>
</template>

<script>
import homeheader from './components/homeheader'
import homeloop from './components/homeloop'
import homeclass from './components/homeclass'
import homedetail from './components/homedetail'
import homestart from './components/homestart'
import axios from 'axios'

export default {
  name: 'Home',
  components:{
      homeheader,
      homeloop,
      homeclass,
      homedetail,
      homestart
    },
    data() {
      return {
        allclass:{}
        
      }
    },
 
  methods:{
    getapi(){
      axios.post('/api/class/getAll').then(this.getapisucc)
    },
    getapisucc(msg){
      if(msg.data.ret){
        const data = msg.data.data
        this.allclass = data.allclass
      }
    },

  },
  mounted() {
    this.getapi()
  },
}
</script>

<style scoped>

</style>